<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>Add Section</title>
</h:head>
<f:view>
	<h:body>
		<ui:composition template="../includes/template.xhtml">
			<ui:define name="mainbody">
				<center>
					<h:form>


						<p:panel header="Add Section" style="min-height: 550px"
							styleClass="prime_panel">
							<center>
								<p:growl id="growl" showDetail="true" sticky="false"
									autoUpdate="true" showSummary="false" />
								<p:spacer height="20" />
								<table border="0" cellpadding="4px" cellspacing="8px">
									<tr>
										<td><h:outputText value="Select Class :" />
										</td>
										<td><p:selectOneMenu value="#{sectionBean.section.clas}"
												required="true" effect="fade" converter="classConverter"
												style="width:155" requiredMessage="Select Class">
												<f:selectItems value="#{sectionBean.classes}" var="s"
													itemLabel="#{s.classTitle}" itemValue="#{s}" />
											</p:selectOneMenu></td>
									</tr>

									<tr>
										<td><h:outputText value="Section Title :" />
										</td>
										<td><p:inputText id="sectionTitle"
												value="#{sectionBean.section.sectionTitle}" required="true"
												requiredMessage="Section title is required" size="19">
												<f:ajax execute="@this" event="blur" />
											</p:inputText></td>
									</tr>

									<tr>
										<td></td>
										<td style="text-align: right"><p:spacer width="5" /> <p:commandButton
												id="submit" value="Submit" type="submit" ajax="false"
												action="#{sectionBean.performAction}" /></td>
									</tr>



								</table>
							</center>
						</p:panel>
					</h:form>
				</center>
			</ui:define>
		</ui:composition>
	</h:body>
</f:view>
</html>
